package main;

public class StartStop {
	int startIndex;
	int stopIndex;
	public StartStop(int startIndex, int stopIndex) {
		super();
		this.startIndex = startIndex;
		this.stopIndex = stopIndex;
	}
	
	public int getStartIndex() {
		return startIndex;
	}
	
	public void setStartIndex(int startIndex) {
		this.startIndex = startIndex;
	}
	
	public int getStopIndex() {
		return stopIndex;
	}
	
	public void setStopIndex(int stopIndex) {
		this.stopIndex = stopIndex;
	}
	
	public int getLength(){
		if(startIndex != 0 && stopIndex != 0)
			return stopIndex - startIndex + 1;
		else
			return 1;
	}
	
}
